#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int z;
	int m;
	int t;
	scanf("%d/%d", &z, &m);
	int a = z;
	int b = m;
	while (b > 0) {
		t = a % b;
		a = b;
		b = t;
	}
	printf("%d/%d", z/a,m/a );
	return 0;
}